%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for mutations/v4/pgJwtTypeIdentifier-bigNumbers"
    Bucket0("Bucket 0 (root)"):::bucket
    Bucket1("Bucket 1 (mutationField)<br />Deps: 14, 15, 20<br /><br />1: PgSelect[11]<br />2: PgSelectRows[17]<br />ᐳ: 16, 18, 19"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 18, 11, 19<br /><br />ROOT Object{1}ᐸ{result}ᐳ[19]"):::bucket
    end
    Bucket0 --> Bucket1
    Bucket1 --> Bucket2

    %% plan dependencies
    __InputObject6{{"__InputObject[6∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ1ᐳ[22]<br />- Constantᐸ'1234567890123456789.123456789'ᐳ[23]<br />- Constantᐸ'987654321098765432'ᐳ[24]"}}:::plan
    PgFromExpression15{{"PgFromExpression[15∈0] ➊<br />More deps:<br />- Constantᐸ1ᐳ[22]<br />- Constantᐸ'1234567890123456789.123456789'ᐳ[23]<br />- Constantᐸ'987654321098765432'ᐳ[24]"}}:::plan
    Object14{{"Object[14∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access12{{"Access[12∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access13{{"Access[13∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access12 & Access13 --> Object14
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access12
    __Value2 --> Access13
    ApplyInput20{{"ApplyInput[20∈0] ➊"}}:::plan
    __InputObject6 --> ApplyInput20
    PgSelect11[["PgSelect[11∈1] ➊<br />ᐸauthenticate(mutation)ᐳ"]]:::sideeffectplan
    Object14 & PgFromExpression15 & ApplyInput20 --> PgSelect11
    First16{{"First[16∈1] ➊"}}:::plan
    PgSelectRows17[["PgSelectRows[17∈1] ➊"]]:::plan
    PgSelectRows17 --> First16
    PgSelect11 --> PgSelectRows17
    PgSelectSingle18{{"PgSelectSingle[18∈1] ➊<br />ᐸauthenticateᐳ"}}:::plan
    First16 --> PgSelectSingle18
    Object19{{"Object[19∈1] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgSelectSingle18 --> Object19
    PgClassExpression21{{"PgClassExpression[21∈2] ➊<br />ᐸ__authenticate__ᐳ"}}:::plan
    Object19 o--o PgClassExpression21

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,__InputObject6,Access12,Access13,Object14,PgFromExpression15,ApplyInput20 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgSelect11,First16,PgSelectRows17,PgSelectSingle18,Object19 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,PgClassExpression21 bucket2

